import VueRouter from 'vue-router'
// 导入路由组件
import HomeContainter from "./compontents/tabbar/HomeContainer.vue"
import MemberContainter from "./compontents/tabbar/MemberContainter.vue"
import ShopContainter from "./compontents/tabbar/ShopContainer.vue"
import SearchContainter from "./compontents/tabbar/SearchContainter.vue"
import Newlist from "./compontents/News/Newlist.vue"
import Newsinfo from "./compontents/News/Newsinfo.vue"

import Photoist from "./compontents/photos/PhotoList.vue"
import Photoinfo from "./compontents/photos/Photoinfo.vue"
import Goodlist from "./compontents/Good/Goodlist.vue"
import Goodinfo from "./compontents/Good/Goodinfo.vue"
import Goodec from "./compontents/Good/Gooddec.vue"
import Goodcomment from "./compontents/Good/Goodcomment.vue"



// 3. 创建路由对象
var router = new VueRouter({
  routes: [  //配置路由规则
      {path:"/",redirect:"/home"},
      {path:"/home",component:HomeContainter},
      {path:"/member",component:MemberContainter},
      {path:"/shopcar",component:ShopContainter},
      {path:"/search",component:SearchContainter},
      {path:"/home/newlist",component:Newlist},
      {path:"/home/Newsinfo/:id",component:Newsinfo},
      {path:"/home/photolist",component:Photoist},
      {path:"/home/photoinfo/:id",component:Photoinfo},
      {path:"/home/goodlist",component:Goodlist},
      {path:"/home/goodinfo/:id",component:Goodinfo,name:'goodinfo'},
      {path:"/home/goodec/:id",component:Goodec,name:'goodec'},
      {path:"/home/goodcomment/:id",component:Goodcomment,name:'goodcomment'}
  ],
  linkActiveClass:"mui-active"  //覆盖默认的路由高两的类
})

// 把路由对象暴露出去
export default router